home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5218 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.microsoft.com!news
  2. From: a-cnadc@microsoft.com (Dann Corbit)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Finding a prime number
  5. Date: 8 Feb 1996 19:55:08 GMT
  6. Organization: Microsoft Corporation
  7. Message-ID: <4fdkes$bnl@news.microsoft.com>
  8. References: <4e875s$nqk@reader2.ix.netcom.com> <7c8_9601301722@tor250.org> <4f7n1o$ol9@mother.usf.edu>
  9. NNTP-Posting-Host: 157.57.171.202
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.93.14
  12.  
  13. In article <4f7n1o$ol9@mother.usf.edu>, yatesc@csee.usf.edu says...
  14. { snip }
  15. >Here is code that does not take a long time to start up and tests
  16. >for primes in the range of unsigned long integers. The longest
  17. >I've seen it run is for about 3 seconds when finding a prime
  18. >around 1 billion:
  19. { code snip }
  20.  
  21. I have a routine that will find primes for 64 bit integers.
  22. It is 500 lines, and not very portable (it requires 64 bit
  23. integers)
  24.  
  25. I have a different routine that finds primes for numbers
  26. up to long double size.
  27.  
  28. If anyone wants a copy, send mail to a-cnadc@microsoft.com
  29. and I'll forward you a copy of either or both.
  30. -- 
  31. The opinions expressed in this message are my own personal views 
  32. and do not reflect the official views of Microsoft Corporation.
  33.  
  34.